package com.study.demo01.consumer;


import com.rabbitmq.client.Channel;
import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Slf4j
@Component("dealQueue")
public class DeadLetterQueueConsumer {

    @RabbitListener(queues = "QD")
    public void receiveQD(Message message, Channel channel) {
        log.info("接收到死信队列消息[{}-{}]", new String(message.getBody()));
    }
}
